package com.example;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

/**
 * @Description: TODO
 * @Author 赵侠客 https://openjdk.org/jeps/254
 * @Date 2023/5/6
 **/
public class JPE254 {


    public static void main(String[] args) throws InterruptedException {
        Long startTime = System.currentTimeMillis();
        List<String> name = IntStream.range(0, 20000000).mapToObj(x -> String.valueOf(x) + x).collect(Collectors.toList());
        System.out.println("add  " + name.size() + " complete ,cast " + (System.currentTimeMillis() - startTime) + "ms");
    }

}
